package com.demo.tankGame;

import javax.swing.*;
import java.awt.event.KeyListener;

/**
 * 绘制画框 放入 画板
 * @author gy
 * @date 2022/4/18
 */
public class YgyTankGame01 extends JFrame{

    private MyPanel mp = null;

    /**
     * 主启动类，将画框 启动起来
     * @param args
     */
    public static void main(String[] args) {
        YgyTankGame01 ygyTankGame01 = new YgyTankGame01();
    }


    public YgyTankGame01() {
        this.mp = new MyPanel();
        this.add(mp);
        this.setSize(1000,750);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.addKeyListener(mp);
        this.setVisible(true);
    }
}
